home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 353 < prev    next >
Encoding:
Text File  |  1996-08-05  |  5.1 KB  |  104 lines

  1. Path: itnews.sc.intel.com!news    
  2. From: Eric Minor <EricX_Minor@ccm.sc.intel.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: VC++ 4.0 question and rantings
  5. Date: 4 Jan 1996 01:26:36 GMT
  6. Organization: Intel - Internet Engineering Group    
  7. Message-ID: <4cfacc$m8b@itnews.sc.intel.com>
  8. NNTP-Posting-Host: eminorx-desk.sc.intel.com
  9.  
  10.  
  11.  
  12. IÆm a fairly new user to Microsoft Visual C++ (ver 4.0) and am
  13. running into a few stumbling blocks.  However, I am an experienced
  14. C++ developer, having used BorlandÆs product (ver 4.5).
  15.  
  16. Before getting to the question, a bit of background about my
  17. philosophy is important I think.  I prefer not to use the code
  18. generating tools that come with both BorlandÆs and MicrosoftÆs
  19. compilers (app and class expert for Borland; app and class wizard
  20. for Microsoft).  I donÆt mind using these smart tools as a
  21. learning tool to generate some sample code which I can then study
  22. in order to learn the app frameworkÆs that come with these products.
  23. However, I do not want to use them for the production applications
  24. that I write for my clients for the following reasons (among others).
  25.  
  26. 1)  Relying on the wizards to generate the code removes me too
  27.     far from the knowledge of what is making the code run.
  28.     Some human needs to understand the inner workings of the
  29.     underlying code otherwise any decent sized project becomes an
  30.     unmaintainable morass of mystery code (IMO).  (Sidebar:  ThatÆs
  31.     kind of my complaint against 4GL tools also:  Do they abstract
  32.     the developer too far away from the knowledge of what lies
  33.     beneath?  And no I donÆt recommend going back to assembler :^) )
  34.  
  35. 2)  I like my code clean and neat.  If you use wizards, they must
  36.     necessarily junk up the code with extraneous commenting that
  37.     helps them to keep track of everything (sections for handler
  38.     functions, virtual functions, etc.)
  39.  
  40. 3)  As a matter of principle, the C++ code that comprises my project
  41.     (along with the various resource files, def files, custom
  42.     controls, etc.) should be largely self-supporting and independent
  43.     of the particular compiler.  Granted, this is never 100% true
  44.     and some migration issues will always need to be addressed.
  45.     Certainly, use of the application frameworks of either compiler
  46.     (OWL or MFC) will tend to tie you to that particular product.
  47.     But in theory, we should be able to migrate these entire class
  48.     hierarchies to another environment and recompile them there (not
  49.     that IÆd want to) along with the rest of the project.  However,
  50.     relying on wizards throws any semblance of portability right out
  51.     the window.  The little commenting schemes and methods of
  52.     operation of the wizards and experts are totally proprietary and
  53.     tie you completely to a particular product.
  54.  
  55. 4)  I donÆt find the point and click interface of the class wizard
  56.     to be any improvement or simplification over a simple text
  57.     editor.  WhatÆs so hard about going to your class definition
  58.     and adding a member variable or function?  WhatÆs so hard about
  59.     cutting and pasting a new function into your implementation file?
  60.     I find unneeded user interfaces for these simple tasks to be a
  61.     hindrance rather than a help.  And again, I assert that this
  62.     added layer of interface tends to prevent the novice C++
  63.     developer from really comprehending what is going on in the code.
  64.  
  65. I could go on, but you get the picture.  With that said, I donÆt
  66. object to having wizards included in these products for those that
  67. find them useful.  However, please donÆt throw up roadblocks for me
  68. if I choose not to use them, which is what I seem to be finding.
  69.  
  70. Whether you agree with my philosophy or not, here is the problem I
  71. am running into.  I have chosen to create my project from scratch
  72. without using the app wizard or class wizard, but it keeps trying
  73. to drag me back in.  I have a simple MDI application that is compiling and running just
  74. fine.  Now I need to start using the grid OLE control (.OCX) that
  75. came bundled with the development environment.
  76.  
  77. The instructions for performing this task are laid out in the
  78. online doco and are straight-forward.  Just select Insert...component
  79. off the main menu which takes you to component gallery and then
  80. select the particular control you want to use.  When I follow these
  81. steps in an app wizard generated project, it works just fine and
  82. adds the control to the dialog editorÆs palette and also creates
  83. header and implementation files for three wrapper classes.  When
  84. I try to do this in my real non-app wizard project (the one I get
  85. paid for), it barfs up the following error message.
  86.  
  87. "The ClassWizard database does not exist and there are no resource
  88. files associated with this project to build one from.  In order to
  89. continue add a resource script to the project."
  90.  
  91. Regarding the message, I do indeed have a resource script included
  92. in the project.  No, IÆm not using class wizard so I donÆt suppose
  93. there is a ClassWizard database.  Will this prevent me from ever
  94. using a third party OCX control?
  95.  
  96. Any helpful information about my primary problem will be appreciated.
  97. Also, IÆd be interested to hear any thoughts regarding my rantings
  98. about wizards and about the product (VC++ 4.0) in general.
  99.  
  100. Thanks,
  101.  
  102. Eric Minor
  103.  
  104.